<%@ page language="java" import="java.util.*"
	contentType="text/html; charset=utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
	</head>

	<body>
		<%
			request.setCharacterEncoding("utf-8");
			String b = request.getParameter("title");
			String c = request.getParameter("message");
			Vector<String> v = application.getAttribute("v") == null ? new Vector<String>()
					: (Vector<String>) application.getAttribute("v");
			String time = new Date().toLocaleString();
			String s = b + "#" + c + "#" + time;
			if (b != null && c != null && !b.equals("") && !c.equals("")) {
				v.add(s);
			}
			application.setAttribute("v", v);
			out.print("<body>");
			out
					.print("<table style='border:1px;cellspacing:10;font-size:20px;width:100%;'>");
			out
					.print("<tr><th style='text-align:center;'>标题</th><th style='text-align:center;'>通知内容</th><th style='text-align:center;'>发布时间</th></tr>");
			for (int i = 0; i < v.size(); i++) {
				out.print("<tr>");
				String st = (String) v.elementAt(i);
				String ss[] = st.split("#");
				for (int j = 0; j < ss.length; j++) {
					out.print("<td style='text-align:center;'>" + ss[j]
							+ "</td>");

				}
				out.print("</tr>");
			}
			out.print("</table>");
			out.print("</body>");
		%>
	</body>
</html>
